1900
InsertControlItem / UserEditor / A2X:

with G2antt1 do
begin
	BeginUpdate();
	BackColor := RGB(240,240,240);
	Chart.PaneWidth[True] := 0;
	ConditionalFormats.Add('1 = 1',Null).Bold := True;
	(IUnknown(Columns.Add('Type')) as EXG2ANTTLib_TLB.Column).Alignment := EXG2ANTTLib_TLB.RightAlignment;
	with Items do
	begin
		h := AddItem('1. A ProgID such as "MSCAL.Calendar.7"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'MSCAL.Calendar','');
		(IUnknown(ItemObject[hX]) as MSACAL_TLB.Calendar).BackColor := $ffffff;
		h := AddItem('2. A CLSID such as "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}','');
		h := AddItem('3. A URL such as "http://www.exontrol.com"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'http://www.exontrol.com','');
		h := AddItem('4. A reference to an Active document such as "file://\\Documents\MyDoc.doc"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'file://C:\empesting.xml','');
		h := AddItem('5.A fragment of HTML such as "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>','');
		ItemHeight[hX] := 56;
		h := AddItem('6.Anything, if it is preffixed by "A2X:"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'A2X:TOC24.Toc24Ctrl.1','');
	end;
	EndUpdate();
end
1899
How do I add a RichTextBox editor
// UserEditorOleEvent event - Occurs when an user editor fires an event.
procedure TForm1.G2antt1UserEditorOleEvent(ASender: TObject; Object : IDispatch;Ev : IOleEvent;var CloseEditor : WordBool;Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		OutputDebugString( Ev );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	DefaultItemHeight := 32;
	with (IUnknown(Columns.Add('RICHTEXT')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.UserEditorType;
		UserEditor('RICHTEXT.RichtextCtrl','');
		with (IUnknown(UserEditorObject) as RichTextLib_TLB.RichTextBox) do
		begin
			AutoVerbMenu := True;
			TextRTF := '{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}';
		end;
	end;
	with Items do
	begin
		AddItem('RICHTEXT.RichtextCtrl');
	end;
	EndUpdate();
end
1898
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TForm1.G2antt1DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		h := ItemFromPoint[-1,-1,c,hit];
		OutputDebugString( Items.CellValue[OleVariant(h),OleVariant(c)] );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		CellValue[OleVariant(AddItem('Item 1')),OleVariant(1)] := 'Item 2';
		CellValue[OleVariant(AddItem('Item 3')),OleVariant(1)] := 'Item 4';
		CellValue[OleVariant(AddItem('Item 5')),OleVariant(1)] := 'Item 6';
	end;
	EndUpdate();
end
1897
How can I display dates in DD/MM/YYYY format

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := False;
	Columns.Add('Date');
	with Items do
	begin
		ItemDivider[AddItem('Different Date Formats')] := 0;
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := '((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := '(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := '((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'day(value) + `/` + month(value) + `/` + year(value)';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'year(value) + ` - ` + day(value) + ` - ` + month(value)';
		h := AddItem('12/1/1971');
		ItemHeight[h] := 24;
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		FormatCell[OleVariant(h),OleVariant(0)] := '`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)';
		ItemDivider[AddItem('Predefined Date Formats')] := 0;
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'value';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'shortdateF(value)';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'shortdate(value)';
		FormatCell[OleVariant(AddItem('12/1/1971')),OleVariant(0)] := 'longdate(value)';
	end;
	EndUpdate();
end
1896
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := False;
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	ColumnsAllowSizing := True;
	(IUnknown(Columns.Add('Column A (cont)')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exColumnResizeContiguously] := OleVariant(True);
	Columns.Add('Column 1');
	(IUnknown(Columns.Add('Column B (cont)')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exColumnResizeContiguously] := OleVariant(True);
	Columns.Add('Column 2');
	EndUpdate();
end
1895
How do I get the column from cursor, when it hovers the empty portion of the items section
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		i := ItemFromPoint[0,-1,c,hit];
		OutputDebugString( 'Column' );
		OutputDebugString( c );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	Columns.Add('Column 0');
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	EndUpdate();
end
1894
How do I add items once the user clicks the empty area
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		i := ItemFromPoint[0,-1,c,hit];
		with Items do
		begin
			CellValue[OleVariant(AddItem(OleVariant(i))),OleVariant(1)] := OleVariant(c);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Number of Items to Add');
	Columns.Add('Click on Column');
	EndUpdate();
end
1893
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib_TLB.exNoLine;
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',1,1,Null);
	end;
	with Chart do
	begin
		FirstVisibleDate := '10/21/1994';
		LevelCount := 2;
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	ScrollBars := Integer(EXG2ANTTLib_TLB.exVScrollEmptySpace) Or Integer(EXG2ANTTLib_TLB.exBoth);
	ScrollPos[True] := Items.ItemCount;
	EndUpdate();
end
1892
Is there any option to stop events
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		OutputDebugString( 'AddItem event is fired only if FreezeEvents(False) is called' );
	end
end;

// AddLink event - Occurs when the user links two bars using the mouse.
procedure TForm1.G2antt1AddLink(ASender: TObject; LinkKey : WideString);
begin
	with G2antt1 do
	begin
		OutputDebugString( 'AddLink event is fired only if FreezeEvents(False) is called' );
	end
end;

// BarResize event - Occurs when a bar is moved or resized.
procedure TForm1.G2antt1BarResize(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
	with G2antt1 do
	begin
		OutputDebugString( 'BarResize event is fired only if FreezeEvents(False) is called' );
	end
end;

with G2antt1 do
begin
	FreezeEvents(True);
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L1',h1,'',h2,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
	FreezeEvents(False);
end
1891
How do I specify a more intensive color if using RenderType property

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -16777216;
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 
	'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 
	'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 
	'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 
	'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC');
		Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $1000000;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Null);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1890
How can I include the child items, when a filter is applied

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	Indent := 16;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	FilterBarPromptVisible := True;
	FilterBarPromptPattern := 'Nancy';
	FilterInclude := EXG2ANTTLib_TLB.exItemsWithChilds;
	Chart.LevelCount := 2;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXG2ANTTLib_TLB.Column).Width := 96;
		(IUnknown(Add('Title')) as EXG2ANTTLib_TLB.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := InsertItem(h0,Null,'Andrew Fuller');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		h0 := InsertItem(h0,Null,'Michael Suyama');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Janet Leverling');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := InsertItem(h0,Null,'Margaret Peacock');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Redmond';
		ExpandItem[0] := True;
	end;
	ApplyFilter();
	EndUpdate();
end
1889
Is it possible to change the date format shown when you scroll the horizontal bar on the chart

with G2antt1 do
begin
	Chart.ToolTip := '<b>Date</b><br><%loc_ldate%>';
end
1888
How do I change the drop down filter icon/button (white)

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ' + 
	'0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YN' + 
	'YuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4h' + 
	'hKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgb' + 
	'hOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWB' + 
	'MJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=');
		Add(1,'CP:2 -4 -4 2 4');
	end;
	Background[EXG2ANTTLib_TLB.exHeaderFilterBarButton] := $1000000;
	Background[EXG2ANTTLib_TLB.exCursorHoverColumn] := BackColor;
	HeaderAppearance := EXG2ANTTLib_TLB.None2;
	BackColorHeader := RGB(255,255,255);
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	HeaderHeight := 24;
	with (IUnknown(Columns.Add('Filter')) as EXG2ANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		AllowSort := False;
		AllowDragging := False;
	end;
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
	end;
	EndUpdate();
end
1887
How do I prevent changing the cell's state ( check-box state )

// CellStateChanging event - Fired before cell's state is about to be changed.
procedure TForm1.G2antt1CellStateChanging(ASender: TObject; Item : HITEM;ColIndex : Integer;var NewState : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			NewState := CellState[OleVariant(Item),OleVariant(ColIndex)];
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('P2')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1886
How do I change the color of the columns's header to cover all levels

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	BackColorLevelHeader := BackColorHeader;
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (IUnknown(Add('C1')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(3);
		end;
		with (IUnknown(Add('C2')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(2);
		end;
		Add('Column1');
	end;
	with Chart do
	begin
		BackColorLevelHeader := G2antt1.BackColorHeader;
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 1.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Null,Null);
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 2.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Null,Null);
	end;
	EndUpdate();
end
1885
Is it possible to extend the columns's header to fill all levels

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (IUnknown(Add('C1')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(3);
		end;
		with (IUnknown(Add('C2')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(2);
		end;
		Add('Column1');
	end;
	with Chart do
	begin
		BackColorLevelHeader := G2antt1.BackColorHeader;
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 1.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Null,Null);
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 2.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Null,Null);
	end;
	EndUpdate();
end
1884
How do I change the color of the columns's header to cover all levels (sample CRD)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	BackColorLevelHeader := BackColorHeader;
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (IUnknown(Add('C1')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(3);
		end;
		with (IUnknown(Add('C2')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(2);
		end;
		(IUnknown(Add('Column1')) as EXG2ANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('Column2')) as EXG2ANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('Column3')) as EXG2ANTTLib_TLB.Column).Visible := False;
		with (IUnknown(Add('FormatLevel')) as EXG2ANTTLib_TLB.Column) do
		begin
			FormatLevel := '18;"Info"[a=17]/(2/3,4)';
			Def[EXG2ANTTLib_TLB.exCellFormatLevel] := '2/3,4';
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
		BackColorLevelHeader := G2antt1.BackColorHeader;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 1.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Null,Null);
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 2.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Null,Null);
	end;
	EndUpdate();
end
1883
Is it possible to extend the columns's header to fill all levels (sample CRD)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (IUnknown(Add('C1')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(3);
		end;
		with (IUnknown(Add('C2')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(2);
		end;
		(IUnknown(Add('Column1')) as EXG2ANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('Column2')) as EXG2ANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('Column3')) as EXG2ANTTLib_TLB.Column).Visible := False;
		with (IUnknown(Add('FormatLevel')) as EXG2ANTTLib_TLB.Column) do
		begin
			FormatLevel := '18;"Info"[a=17]/(2/3,4)';
			Def[EXG2ANTTLib_TLB.exCellFormatLevel] := '2/3,4';
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
		BackColorLevelHeader := G2antt1.BackColorHeader;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 1.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Null,Null);
		h := AddItem('');
		CellValue[OleVariant(h),OleVariant(1)] := 'Cell 2.2';
		CellValue[OleVariant(h),OleVariant(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Null,Null);
	end;
	EndUpdate();
end
1882
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column) do
	begin
		SortType := EXG2ANTTLib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXG2ANTTLib_TLB.exShowFocusItem) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox) Or Integer(EXG2ANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('DateTime')) as EXG2ANTTLib_TLB.Column) do
	begin
		SortType := EXG2ANTTLib_TLB.SortDateTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib_TLB.exShowFocusItem) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox) Or Integer(EXG2ANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('Time')) as EXG2ANTTLib_TLB.Column) do
	begin
		SortType := EXG2ANTTLib_TLB.SortTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib_TLB.exShowFocusItem) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox) Or Integer(EXG2ANTTLib_TLB.exSortItemsDesc);
		FormatColumn := 'time(value)';
	end;
	with (IUnknown(Columns.Add('Numeric')) as EXG2ANTTLib_TLB.Column) do
	begin
		SortType := EXG2ANTTLib_TLB.SortNumeric;
		DisplayFilterButton := True;
		FilterList := Integer(EXG2ANTTLib_TLB.exShowFocusItem) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox) Or Integer(EXG2ANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('String')) as EXG2ANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXG2ANTTLib_TLB.exShowFocusItem) Or Integer(EXG2ANTTLib_TLB.exShowCheckBox) Or Integer(EXG2ANTTLib_TLB.exSortItemsDesc);
	end;
	with Items do
	begin
		h := AddItem('1/27/2010');
		CellValue[OleVariant(h),OleVariant(1)] := '1/27/2010 10:00:00 AM';
		CellValue[OleVariant(h),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h),OleVariant(3)] := OleVariant(1);
		CellValue[OleVariant(h),OleVariant(4)] := CellValue[OleVariant(h),OleVariant(3)];
		h := AddItem('1/27/2011');
		CellValue[OleVariant(h),OleVariant(1)] := '1/27/2011 9:00:00 AM';
		CellValue[OleVariant(h),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h),OleVariant(3)] := OleVariant(11);
		CellValue[OleVariant(h),OleVariant(4)] := CellValue[OleVariant(h),OleVariant(3)];
		h := AddItem('11/2/2010');
		CellValue[OleVariant(h),OleVariant(1)] := '11/2/2010 9:00:00 AM';
		CellValue[OleVariant(h),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h),OleVariant(3)] := OleVariant(2);
		CellValue[OleVariant(h),OleVariant(4)] := CellValue[OleVariant(h),OleVariant(3)];
	end;
	Columns.Item['DateTime'].DisplayFilterDate := False;
	EndUpdate();
end
1881
Is there a way to set the time zone per item

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h1 := AddItem('Task A');
		AddBar(h1,'','1/2/2001','1/18/2001','TZ1','Time Zone / Item');
		ItemBar[h1,'TZ1',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		ItemBar[h1,'TZ1',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(255);
		AddBar(h1,'Task','1/20/2001','1/29/2001','Z1',Null);
		h1 := AddItem('Task B');
		AddBar(h1,'','1/6/2001','1/24/2001','TZ2','Time Zone / Item');
		ItemBar[h1,'TZ2',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		ItemBar[h1,'TZ2',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(65535);
		AddBar(h1,'Task','1/3/2001','1/12/2001','Z1',Null);
	end;
	EndUpdate();
end
1880
Is there a way to turn arrow-key-navigation between the items on and off
// KeyDown event - Occurs when the user presses a key while an object has the focus.
procedure TForm1.G2antt1KeyDown(ASender: TObject; var KeyCode : Smallint;Shift : Smallint);
begin
	with G2antt1 do
	begin
		KeyCode := 0;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Effort')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(21);
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib_TLB.exHistOverload;
			HistogramCriticalValue := 3;
			ShowHistogramValues := 'value>3?255:1';
			HistogramItems := -11;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
			FormatHistogramValues := 'value format `2`';
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(6.79);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(3.19);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
1879
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('P2')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		FormatColumn := '1 index ``';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		AddItem('Root');
		AddItem('Root');
	end;
	SingleSort := False;
	Layout := 'multiplesort="C0:1 C1:2";collapse=""';
	EndUpdate();
end
1878
How can I decode the Layout property

with G2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('C1');
		(IUnknown(Add('C2')) as EXG2ANTTLib_TLB.Column).Position := 1;
	end;
	with Items do
	begin
		CellValue[OleVariant(AddItem('SubItem 1.1')),OleVariant(1)] := 'SubItem 1.2';
		CellValue[OleVariant(AddItem('SubItem 2.1')),OleVariant(1)] := 'SubItem 2.2';
	end;
	Columns.Item['C2'].SortOrder := EXG2ANTTLib_TLB.SortDescending;
	EndUpdate();
	OutputDebugString( 'Encoded:' );
	OutputDebugString( Layout );
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		OutputDebugString( 'Decoded: ' );
		OutputDebugString( Decode64TextW[G2antt1.Layout] );
	end;
end
1877
Is it possible to define a bar inside a bar (method 2)

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Tasks');
		AddBar(h,'Task','1/3/2001','1/7/2001','A1',Null);
		AddBar(h,'Task','1/4/2001','1/8/2001','A2',Null);
		AddBar(h,'Task','1/9/2001','1/13/2001','A3',Null);
	end;
	with Chart.Notes do
	begin
		with Add('N1',OleVariant(G2antt1.Items.FirstVisibleItem),'A1','') do
		begin
			PartText[EXG2ANTTLib_TLB.exNoteStart] := ' ';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartFixedHeight[EXG2ANTTLib_TLB.exNoteStart] := 11;
			PartCanMove[EXG2ANTTLib_TLB.exNoteStart] := True;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ff00;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVOffset[EXG2ANTTLib_TLB.exNoteStart] := 4;
		end;
	end;
	EndUpdate();
end
1876
Is it possible to define a bar inside a bar (method 1)

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
			OverlaidGroup := 'Task,TaskB';
		end;
		with Bars.Add('Aka') do
		begin
			Color := $ff00;
			Pattern := EXG2ANTTLib_TLB.exPatternSolid;
		end;
		with Bars.Add('Task%Aka') do
		begin
			Shortcut := 'TaskB';
			OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
			OverlaidGroup := 'Task,TaskB';
		end;
	end;
	with Items do
	begin
		h := AddItem('Tasks');
		AddBar(h,'TaskB','1/3/2001','1/7/2001','A1',Null);
		ItemBar[h,'A1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.25);
		AddBar(h,'Task','1/4/2001','1/8/2001','A2',Null);
		AddBar(h,'Task','1/9/2001','1/13/2001','A3',Null);
	end;
	EndUpdate();
end
1875
How do I show the bar with a solid color, no border (method 1)

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Color := $ff;
			Pattern := EXG2ANTTLib_TLB.exPatternSolid;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
	end;
	EndUpdate();
end
1874
How do I show the bar with a solid color, no border (method 2)

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Color := $ff;
			StartColor := Color;
			EndColor := Color;
			Pattern := EXG2ANTTLib_TLB.exPatternBox;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
	end;
	EndUpdate();
end
1873
How do I show the bar with a solid color, no border (method 3)

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
	end;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(1,'gBFLBCJwBAEHhEJAAEhABJkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5AcgPfKgAAFESNY5gSL5Yj' + 
	'2IjrRDCMAggI');
	end;
	with Chart.Bars.Item['Task'] do
	begin
		Color := $10000ff;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
	end;
	EndUpdate();
end
1872
How do I find the cell's type, or what the cell holds

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(IUnknown(Add('Value')) as EXG2ANTTLib_TLB.Column).Width := 24;
		(IUnknown(Add('Type')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'type(%0)';
		(IUnknown(Add('TypeAsString')) as EXG2ANTTLib_TLB.Column).FormatColumn := '(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `bo' + 
	'olean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)';
		(IUnknown(Add('Length')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'len(%0)';
	end;
	with Items do
	begin
		AddItem(Null);
		AddItem('');
		CellValue[OleVariant(.AddItem(Null)),OleVariant(0)] := (IUnknown(G2antt1.DefaultInterface) as EXG2ANTTLib_TLB.G2antt);
		CellValue[OleVariant(AddItem(Null)),OleVariant(0)] := OleVariant(True);
		CellValue[OleVariant(AddItem(Null)),OleVariant(0)] := OleVariant(-1);
		CellValue[OleVariant(AddItem(Null)),OleVariant(0)] := OleVariant(-1);
		CellValue[OleVariant(AddItem(Null)),OleVariant(0)] := '1/1/2001';
	end;
	EndUpdate();
end
1871
Is it possible to allow changing the bar's parent while bar's start/end margins should stay unchanged
// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TForm1.G2antt1BarParentChange(ASender: TObject; Item : HITEM;Key : OleVariant;NewItem : HITEM;var Cancel : WordBool);
begin
	with G2antt1 do
	begin
		Items.SelectItem[NewItem] := True;
		OutputDebugString( 'BarParentChange from ' );
		OutputDebugString( Items.CellCaption[OleVariant(Item),OleVariant(0)] );
		OutputDebugString( ' to ' );
		OutputDebugString( Items.CellCaption[OleVariant(NewItem),OleVariant(0)] );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Members')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with Chart do
	begin
		SelBackColor := G2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 96;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(False);
		end;
	end;
	with Items do
	begin
		AddItem('Member <b>1</b>');
		h := AddItem('Member <b>2</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarCanMove] := OleVariant(False);
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarCanMoveToAnother] := OleVariant(True);
		AddItem('Member <b>3</b>');
		AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1870
Is it possible to (un)highlight the day/night shifts

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		with Chart do
		begin
			ShowNonworkingDates := False;
			ShowNonworkingHours := False;
			BackColor := $ffffff;
		end;
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		UnitWidth := 64;
		PaneWidth[False] := 0;
		NonworkingHours := 15728895;
		NonworkingHoursPattern := EXG2ANTTLib_TLB.exPatternSolid;
		NonworkingDaysPattern := NonworkingHoursPattern;
		NonworkingHoursColor := $f0f0f0;
		NonworkingDaysColor := $d4d4d4;
		BackColor := $fafafa;
	end;
	EndUpdate();
end
1869
How can I add a vertical line at specified date-time

with G2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 18;
		LevelCount := 2;
		UnitWidth := 32;
		FirstVisibleDate := '1/1/2010';
		MarkTimeZone('M1','1/5/2010','1/5/2010',OleVariant(16711680),'50:5;3');
		MarkTimeZone('M2','1/6/2010','1/6/2010',OleVariant(16711680),':5');
		MarkTimeZone('M3','1/7/2010 10:00:00 AM','1/7/2010 10:00:00 AM',OleVariant(255),'50:3;;zone');
	end;
end
1868
How do I clear all date-time zones
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		Chart.RemoveTimeZone('<*>');
	end
end;

// RClick event - Fired when right mouse button is clicked
procedure TForm1.G2antt1RClick(ASender: TObject; );
begin
	with G2antt1 do
	begin
		Chart.RemoveTimeZone('<Z*>');
	end
end;

with G2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 18;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2010';
		MarkTimeZone('Z1','1/4/2010','1/5/2010',OleVariant(255),Null);
		MarkTimeZone('Z2','1/11/2010','1/12/2010',OleVariant(65280),Null);
		MarkTimeZone('M1','1/7/2010','1/8/2010',OleVariant(16711680),'50:5;3');
	end;
end
1867
How do I place a comment above/bellow the bar (sample 4)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(0);
			Def[EXG2ANTTLib_TLB.exBarExtraCaption] := ' ';
			Def[EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(0);
			Def[EXG2ANTTLib_TLB.exBarExtraCaptionVAlign] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarExtraCaption] := '<font ;6>user comment';
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarExtraCaption] := '<font ;6>user comment';
	end;
	EndUpdate();
end
1866
How do I place a comment above/bellow the bar (sample 3)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(18);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(0);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarExtraCaption] := '<font ;6>user comment';
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(0);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarExtraCaptionVAlign] := OleVariant(16);
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarExtraCaption] := '<font ;6>user comment';
	end;
	EndUpdate();
end
1865
How do I place a comment under the bar (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(0);
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
	end;
	EndUpdate();
end
1864
How do I place a comment under the bar (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(18);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(0);
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
	end;
	EndUpdate();
end
1863
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 2)

// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TForm1.G2antt1BarParentChange(ASender: TObject; Item : HITEM;Key : OleVariant;NewItem : HITEM;var Cancel : WordBool);
begin
	with G2antt1 do
	begin
		Items.SelectItem[NewItem] := True;
		Cancel := ConditionalFormats.Item['NOTRED'].Verify[NewItem];
	end
end;

// ChartEndChanging event - Occurs after the chart has been changed.
procedure TForm1.G2antt1ChartEndChanging(ASender: TObject; Operation : BarOperationEnum);
begin
	with G2antt1 do
	begin
		SelForeColor := $8000000e;
		SelBackColor := $8000000d;
		Chart.SelBackColor := G2antt1.SelBackColor;
		ConditionalFormats.Clear();
	end
end;

// ChartStartChanging event - Occurs when the chart is about to be changed.
procedure TForm1.G2antt1ChartStartChanging(ASender: TObject; Operation : BarOperationEnum);
begin
	with G2antt1 do
	begin
		SelForeColor := ForeColor;
		SelBackColor := BackColor;
		with Chart do
		begin
			SelBackColor := BackColor;
		end;
		with ConditionalFormats.Add('%0 contains `Allowed` ','RED') do
		begin
			Enabled := False;
		end;
		with ConditionalFormats.Add('not ( %0 contains `Allowed` )','NOTRED') do
		begin
			BackColor := $1fefefe;
			ChartBackColor := BackColor;
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABZkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUbyDBIGQSCCZYDmKA3fj' + 
	'0AI9P7FcgSABEEigNIxToOU4jFgeCR2TqQRK1BDQbQSFCaZrmMKIXICO40WBQFhTdLlRyBBKzLKtCyaBqWaZrWxZE72ZaFVTdOK6bDvGwoarid56X7beA2PgdZTjQi5c' + 
	'CxG5sLrTBZtYzfET3diOEYPQzHMpzDB7bxbGaXZBlGSZbjeGZBUjQc7yfSNMw/HqKZQ6cQwTAIgI');
	(IUnknown(Columns.Add('Members')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
	with Chart do
	begin
		SelBackColor := G2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		LevelCount := 2;
		PaneWidth[False] := 96;
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Member <b>1</b>');
		h := AddItem('Member <b>Allowed</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarCanMoveToAnother] := OleVariant(True);
		h := AddItem('Member <b>Allowed</b>');
		h := AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1862
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 1)

// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TForm1.G2antt1BarParentChange(ASender: TObject; Item : HITEM;Key : OleVariant;NewItem : HITEM;var Cancel : WordBool);
begin
	with G2antt1 do
	begin
		Items.SelectItem[NewItem] := True;
		Cancel := ConditionalFormats.Item['NOTRED'].Verify[NewItem];
	end
end;

// ChartEndChanging event - Occurs after the chart has been changed.
procedure TForm1.G2antt1ChartEndChanging(ASender: TObject; Operation : BarOperationEnum);
begin
	with G2antt1 do
	begin
		SelForeColor := $8000000e;
		SelBackColor := $8000000d;
		Chart.SelBackColor := G2antt1.SelBackColor;
		ConditionalFormats.Clear();
	end
end;

// ChartStartChanging event - Occurs when the chart is about to be changed.
procedure TForm1.G2antt1ChartStartChanging(ASender: TObject; Operation : BarOperationEnum);
begin
	with G2antt1 do
	begin
		SelForeColor := ForeColor;
		SelBackColor := BackColor;
		with Chart do
		begin
			SelBackColor := BackColor;
		end;
		with ConditionalFormats.Add('%0 contains `Allowed` ','RED') do
		begin
			BackColor := $8080ff;
			ChartBackColor := BackColor;
		end;
		with ConditionalFormats.Add('not ( %0 contains `Allowed` )','NOTRED') do
		begin
			Enabled := False;
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Members')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
	with Chart do
	begin
		SelBackColor := G2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		LevelCount := 2;
		PaneWidth[False] := 96;
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Member <b>1</b>');
		h := AddItem('Member <b>Allowed</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		ItemBar[h,'T102',EXG2ANTTLib_TLB.exBarCanMoveToAnother] := OleVariant(True);
		h := AddItem('Member <b>Allowed</b>');
		h := AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1861
How can I check, if a specified item fits a specified conditional format expression
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		h := ItemFromPoint[-1,-1,c,hit];
		OutputDebugString( ConditionalFormats.Item['RED'].Verify[h] );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	Chart.SelBackColor := G2antt1.SelBackColor;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[OleVariant(2)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
	Columns.Item[OleVariant(4)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
	with ConditionalFormats do
	begin
		with Add('%1 = 5','RED') do
		begin
			BackColor := $8080ff;
			ChartBackColor := BackColor;
		end;
	end;
	EndUpdate();
end
1860
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 3)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with Chart do
	begin
		SelBackColor := G2antt1.SelBackColor;
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[OleVariant(2)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
	Columns.Item[OleVariant(4)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Null) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			ForeColor := BarColor;
			Bold := True;
		end;
	end;
	EndUpdate();
end
1859
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with Chart do
	begin
		SelBackColor := G2antt1.SelBackColor;
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[OleVariant(2)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
	Columns.Item[OleVariant(4)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Null) do
		begin
			ApplyTo := EXG2ANTTLib_TLB.FormatApplyToEnum($1);
			BackColor := $8080ff;
		end;
		with Add('%1 in (3,5)',Null) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			ChartBackColor := $8080ff;
		end;
	end;
	EndUpdate();
end
1858
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 1)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	BackColorAlternate := RGB(240,240,240);
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	Chart.SelBackColor := G2antt1.SelBackColor;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[OleVariant(2)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
	Columns.Item[OleVariant(4)].Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Null) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			BackColor := $8080ff;
			ChartBackColor := $8080ff;
		end;
	end;
	EndUpdate();
end
1857
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TForm1.G2antt1OLEStartDrag(ASender: TObject; Data : IExDataObject;var AllowedEffects : Integer);
begin
	// Data.SetData("data to drag")
	with G2antt1 do
	begin
		AllowedEffects := 1;
	end
end;

with G2antt1 do
begin
	OLEDropMode := EXG2ANTTLib_TLB.exOLEDropManual;
	Background[EXG2ANTTLib_TLB.exDragDropAfter] := $ffffff;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
end
1856
How do I change the visual appearance of the split bars

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABEgDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZBGUBJDjWGgyQjOEByDI' + 
	'MRwjE6UZBgeCRViEMo9RrSEZSLAdGRFAaVYDdULBEACU5VRZQFCwTQcBhpIyoZpkECobh2TYgQjYNT1NSkLxeGoSbbuGhBQrOAw1XTEMhyDR0LTJM6bMBACqrBi2L4xU' + 
	'RfOBRXLQAYbHjAZ7rSgacjKRpKRbmAV4Oh+O5pQjadp1TidNwHLoAK7nGwbbgmfwAZrAdjABj1HgBNS2dDkaabQrKEZ4XYAHAXVROOQTWIANb2XC4bwSLAwTJJYzjThi' + 
	'C2GInFOOQckiVw6AeCIvHSBzkCwDxfE6WZ2jsehICadx5kGYZdDgMRrA2c4NmWY56jyGxgEQJIgGkGJHEGVByBkWoCjkNAAAQIQ2AYRoDGQJAoKuZYgBgRZHggHZqAkA' + 
	'ZDjYGA7E8KB0kyB5LiiBgigiYhIgiQ4Jk4WIkn6CphjQDgbDmIwDBIMg3GMQ4uDaDZjgiZg6DIY5DGIPg/GQBAMneEJMFkFJqhGTppCYSoSmSSQ2EoPJlAMIhSDmZREA' + 
	'yVYVk0eRkm+FpkmkdhehaTp4iSZQxiYRAODIMQODmJJxhqTwJjYbobmcCZGHKGxLjmVQDC+J4DiYeg8GGWYuH6H5oAoBoCgcTwimaBodmeGZongPRPCoCoOiOZ5qBIIo' + 
	'iAuaZomkPoPGOToEiaaZKHaHYfiUA5OhMAAngoVh6iYKYqHqKoqmGWoGiOKRkHOKJ7D2TxKgaNotmuCpmFAPQrkqPh4iwaw6laOowmwOpwnSL4LmiXJ9D4TxbBqTozm0' + 
	'CxGjwPRtEsIJsjWT4Dlydo1C2Sx2l6N5uAOWpijIDpbhYQ42i4K4mmqOpukuMpnjIJIjmKco5m8S5WnaPZkDuSJ4h0S46FKcY8m+DAHAGPovkoUhgD4cILmsCpCnCTA2' + 
	'nKQgPhwFokh4JpjmsFpEDGDBnBqRpwgwWJ6kSKhZjie5FnGTIXCWR4yAmYh+D+D48g8HpLnMDJHDIPoylObwpWIY5/CyTJzkydw1kSIhzA6ZQ7E+fJrDWUZ0g0JxKksT' + 
	'5NDSPJTmUaRcmAN5Nn0FJ/lMdYNGcWpWnWHRaGAMZ2AQDoEDKNhLicVpViQDYnGqWpPl2HxFDQNwJgoLoGGaCcDInRdjMCuNYbovR2D2FyNgNIcAJC5FWKwNwcBqAzCW' + 
	'BoPgTA8BkEwFwN4HRjjyAMH8EgcQ5CaGIFoAAHQ3AgAAIAQBAQ==');
		Add(2,'gBFLBCJwBAEHhEJAAEhABBYDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZTgMYRSASI43RoMUIzVA' + 
	'cQxDEaIZLlGQYHgkNIhDJPcZ0VDUbQGBiQIRmIAHNBwJJUVZFdBDLQkQy5HapZDkECobA+CZQTzUUI1LS9WS1HYaRJle4YRDUMJyQjdV4TRINHQvMinYzqOzrOhaW5TS' + 
	'zLcqyCK0SxxR4AJ4yGobJjiQYJShXcxyDQ8dyZC7PQohG7ofxUAKDVjhMjZRQeMS9JCwaThHElRQHMyBdJkKA9Iq2WaGXBeeQ3JbNbzrYzHb5hHZgAzTOoWbzWFT8BJO' + 
	'FOCAYGcJJjHGTh+C2H40AAL5ckyBQDFkKoWHYLw9iGTpGDUY4zkIdwbF8JhbgMc5hF6OJ8C6BhTkOcBAlsR4NnQaAflAIQJBQBoRgwdAdEcIYVEUQJBGYOBCBMYQUGgN' + 
	'hCEKB5FB4VBBgQXJgF+IAzA4Ig5GIQIQBwOxiGiIgngoYpIi4LoKiMA5KDIMwjEKakmk6OJkkmDpNgidgtgwI55AYJw5iQQwSEYNxkgiZJrEITppDSc4TkyCREmeFJkC' + 
	'kAkLmWAwWFoOolkkNheDuJJJDSb4YmIQ4UkaGZlFkVJVhqTR5jYYw7mWeQ1AkPAnEmVh1C6Z4JiYL4KGQYwQmOH5PBoBh2h0EIaAaBg8GMI5Ij6IpokoNoOiOaJDiaEo' + 
	'iA8KgegGIRpGoZoaiaaZDmCdYlGkZAmgmKJqEqFomimaoKCaIoqGqSo2iwQhknqRoyiyaxKlaNotk8OpCjiLprkqbQJD0LALAaQowmwSwWkaMZQhOVpKjKbJLDaTozm0' + 
	'CxFAkPYtEsVpWjWbYLGaWo2lCGRil6N5pAuBpiDsbhLH6Zo3G4ax6HhYgpFibYjCWa4ml4QhPguVp2D4b4Li6bYPmiSZWngPhvGuWQJj+b5zmsBo+iePAmDCIwoGwGJ6' + 
	'kEL4MA8EJDjCC46FWQwoBObwGkQD4UCcDpDg+PIHBWPpiHwYJxD+MgcH8BpH4cBJ7kicIrnKC4hg+fIjCoPoQhyOwuD8M5CnMPpJCMCIIkOOQOlOfw1k6MnJDwPw0GOf' + 
	'hvDGdQNAIKdalOAJfDedJdC8SxCeyNJQleZhdEoJ4iEyLYWlWVx0GQJJslqTQtjcVJYi6aZ8mMM43EmFwCECJkfYyWiDuAuG0EgdBNB8AYHYMgxwEM1EAIAgIA==');
		Add(3,'CP:2 -2 -2 2 2');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars do
		begin
			with Add('A') do
			begin
				Height := 15;
				Color := $2000000;
				Pattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			end;
			with Add('Task:A') do
			begin
				Shortcut := 'Task';
				Height := 15;
				Color := $1000000;
				Def[EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
			end;
		end;
		NonworkingDaysColor := $f0f0f0;
		SelBarColor := $ff0000;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/16/2001',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65535);
		h := AddItem('Task 3');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		h := AddItem('Task 4');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarNonWorkingColor] := OleVariant(58753152);
		h := AddItem('Task 5');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarNonWorkingColor] := OleVariant(25198720);
		h := AddItem('Task 6');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarNonWorkingColor] := OleVariant(2130771712);
	end;
	EndUpdate();
end
1855
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 36;
	end;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '4/6/2009';
		LevelCount := 2;
		with Bars.Add('Task:Progress') do
		begin
			Shortcut := 'TaskS';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=((1:=int(0:= (%258))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0' + 
	' ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')%>';
		end;
		ResizeUnitScale := EXG2ANTTLib_TLB.exMinute;
	end;
	with Items do
	begin
		AddBar(AddItem('T1'),'TaskS','4/10/2009 2:30:00 AM','4/16/2009 2:30:00 AM',Null,Null);
		AddBar(AddItem('T2'),'TaskS','4/14/2009 9:00:00 AM','4/22/2009 10:10:00 AM',Null,Null);
		ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
		ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
	EndUpdate();
end
1854
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 36;
	end;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '4/6/2009';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exHour;
		ResizeUnitScale := EXG2ANTTLib_TLB.exMinute;
		Bars.Item['Task'].Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=((1:=int(0:= (%513))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0' + 
	' ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')%>';
	end;
	with Items do
	begin
		AddBar(AddItem('T1'),'Task','4/6/2009 2:30:00 AM','4/6/2009 12:35:00 PM',Null,Null);
		AddBar(AddItem('T2'),'Task','4/6/2009 9:00:00 AM','4/6/2009 10:10:00 AM',Null,Null);
		ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
	EndUpdate();
end
1853
Does it support single or multiple split pane views

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Background[EXG2ANTTLib_TLB.exSplitBar] := $808080;
	Background[EXG2ANTTLib_TLB.exCSplitBar] := $282828;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternShadow;
			Shape := EXG2ANTTLib_TLB.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := Integer(EXG2ANTTLib_TLB.exAllowTwoSplitPane) Or Integer(EXG2ANTTLib_TLB.exAllowOneSplitPane);
		SplitPaneWidth := '128,128';
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1852
How can I programmatically add more split panes ( by code)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Background[EXG2ANTTLib_TLB.exSplitBar] := $808080;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternShadow;
			Shape := EXG2ANTTLib_TLB.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib_TLB.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	with Chart do
	begin
		ScrollTo(EndPrintDate,OleVariant(1));
		SplitPaneWidth := '128,128,128';
		ScrollTo(StartPrintDate,OleVariant(1));
	end;
	EndUpdate();
end
1851
How can I programmatically add a split pane, or adding a split view at runtime

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Background[EXG2ANTTLib_TLB.exCSplitBar] := $282828;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternShadow;
			Shape := EXG2ANTTLib_TLB.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib_TLB.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	with Chart do
	begin
		ScrollTo(EndPrintDate,OleVariant(1));
		SplitPaneWidth := '128';
		ScrollTo(StartPrintDate,OleVariant(1));
	end;
	EndUpdate();
end
1850
Is there any way, property, procedure or anything else to split the control into multiple views

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Background[EXG2ANTTLib_TLB.exCSplitBar] := $282828;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternShadow;
			Shape := EXG2ANTTLib_TLB.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib_TLB.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1849
It appears that I can not use the ItemFromPoint property in my environment. What else I can do

// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		OutputDebugString( ExecuteTemplate('Dim c, hit; ItemFromPoint(-1,-1, c, hit )') );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Default')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	Chart.PaneWidth[True] := 0;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1848
How can I change the color for selected links (ebn)

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -2;
		Add(1,'gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBi' + 
	'OEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rY' + 
	'zuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Txx' + 
	'gGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4F' + 
	'4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==');
		Add(2,'CP:1 -2 -2 2 2');
	end;
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib_TLB.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $20000ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib_TLB.exLinkSelected] := OleVariant(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1847
How can I change the color for selected links (color, no frame)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib_TLB.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $7f0000ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib_TLB.exLinkSelected] := OleVariant(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1846
How can I change the color for selected links (color, frame)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib_TLB.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib_TLB.exLinkSelected] := OleVariant(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Null);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1845
By default, the bar gets selected once the user releases the button of the mouse. Is it possible to change this behavior so the bar gets selected once the user presses the button of the mouse
// MouseDown event - Occurs when the user presses a mouse button.
procedure TForm1.G2antt1MouseDown(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		h := ItemFromPoint[-1,-1,c,hit];
		b := Chart.BarFromPoint[-1,-1];
		with Items do
		begin
			ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(False);
			ItemBar[h,OleVariant(b),EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 32;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBi' + 
	'OEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rY' + 
	'zuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Txx' + 
	'gGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4F' + 
	'4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==');
		Add(2,'CP:1 -2 -2 2 2');
	end;
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $2000000;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2002','1/4/2002','A',Null);
		AddBar(h,'Task','1/6/2002','1/10/2002','B',Null);
		AddBar(h,'Task','1/11/2002','1/14/2002','C',Null);
		ItemBar[h,'B',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1844
How can I change the bar's color (sample 3, ebn, individual, global)

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -2;
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 
	'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 
	'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 
	'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 
	'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC');
		Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $1000000;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Null);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1843
How can I change the bar's color (sample 2, global)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $ff;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $ff;
			StartColor := Color;
			EndColor := Color;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Null);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1842
How can I change the bar's color (sample 1, individual)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		Bars.Item['Summary'].Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J','  (default)');
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1','(default)');
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2','(default)');
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[hSummaryK,'',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ItemBar[0,'<K*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1841
How do I make the control read-only (method 2)

// Edit event - Occurs just before editing the focused cell.
procedure TForm1.G2antt1Edit(ASender: TObject; Item : HITEM;ColIndex : Integer;var Cancel : WordBool);
begin
	with G2antt1 do
	begin
		Cancel := True;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Editor')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.CheckListType;
		AddItem(1,'One',Null);
		AddItem(2,'Two',Null);
	end;
	with (IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.CheckValueType;
			Option[EXG2ANTTLib_TLB.exCheckValue1] := OleVariant(2);
		end;
	end;
	with Items do
	begin
		CellValue[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := OleVariant(0);
		CellValue[OleVariant(AddItem(OleVariant(2))),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
1840
How do I make the control read-only (method 1)

with G2antt1 do
begin
	BeginUpdate();
	ReadOnly := EXG2ANTTLib_TLB.exReadOnly;
	with (IUnknown(Columns.Add('Editor')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.CheckListType;
		AddItem(1,'One',Null);
		AddItem(2,'Two',Null);
	end;
	with (IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.CheckValueType;
			Option[EXG2ANTTLib_TLB.exCheckValue1] := OleVariant(2);
		end;
	end;
	with Items do
	begin
		CellValue[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := OleVariant(0);
		CellValue[OleVariant(AddItem(OleVariant(2))),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
1839
The ReadOnly property does not prevent changing the column's check-box (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('C1')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 18;
		Editor.EditType := EXG2ANTTLib_TLB.CheckValueType;
	end;
	Columns.Add('C2');
	with Items do
	begin
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := 'Item 1';
		CellValue[OleVariant(AddItem(OleVariant(-1))),OleVariant(1)] := 'Item 2';
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := 'Item 3';
	end;
	ReadOnly := EXG2ANTTLib_TLB.exReadOnly;
	Columns.Item[OleVariant(0)].Editor.Option[EXG2ANTTLib_TLB.exCheckValue2] := OleVariant(2);
	EndUpdate();
end
1838
The ReadOnly property does not prevent changing the column's check-box (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('C1')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 18;
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.CheckValueType;
			Option[EXG2ANTTLib_TLB.exCheckValue2] := OleVariant(1);
		end;
	end;
	Columns.Add('C2');
	with Items do
	begin
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := 'Item 1';
		CellValue[OleVariant(AddItem(OleVariant(-1))),OleVariant(1)] := 'Item 2';
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := 'Item 3';
	end;
	ReadOnly := EXG2ANTTLib_TLB.exReadOnly;
	EndUpdate();
end
1837
How can I change the visual appearance of the control's split bar (sample 3)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABPsIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRokAYYRDIMg5SBIETzFIMCQ9AaaJpieRJGi' + 
	'iKoJSxHErgFD8QxzEKOZqnCapViAMpOAZQAwDAIoWhpKKBRhqOpRUhaID/WAAFCUZK4ASTDCyLRgNy4lACgI');
		Add(2,'gBFLBCJwBAEHhEJAAEhABPkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRoiEYhXDiIAxARHcgyBIMPQJGSaZpkSRpIi' + 
	'qHItS6BM4RVKkcw7G6BaJnGJpADKTQGQiMIwDAIoWhpKCBaiqSpqMglf5fg6pOJqHACZZKWLNLpxDBMAkBA=');
		Add(3,'gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGQCwTCIYhmHKSRhGSIRSDcOIgDCBEbyDIEQw9AiZZqmaRZHi' + 
	'mK4cS5MEhwHKsLSLGyOZwoSapbgmJooU5KUwSYKQcxBI6laYpIAKJhiWobTxUEBwMKlJw5KoBJxjKqIbp2XZsUxIAxXEA1HBgGASRZGS5bDreeQ0UZCL74GAFUy/Liba' + 
	'6weqnLhGCYBgIA==');
	end;
	Background[EXG2ANTTLib_TLB.exSplitBar] := $1808080;
	Background[EXG2ANTTLib_TLB.exHSplitBar] := $2808080;
	Background[EXG2ANTTLib_TLB.exCSplitBar] := $3010101;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		HistogramVisible := True;
		HistogramHeight := 64;
		OverviewHeight := 48;
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
	end;
	EndUpdate();
end
1836
How can I change the color for the control's split bar (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	Background[EXG2ANTTLib_TLB.exSplitBar] := $bebebe;
	Background[EXG2ANTTLib_TLB.exHSplitBar] := $808080;
	Background[EXG2ANTTLib_TLB.exCSplitBar] := $10000;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		HistogramVisible := True;
		HistogramHeight := 64;
		OverviewHeight := 48;
		OverviewVisible := EXG2ANTTLib_TLB.exOverviewShowAll;
	end;
	EndUpdate();
end
1835
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 2 )

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '12/26/2000';
		PaneWidth[False] := 128;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('');
		h := AddItem('Item');
		AddItem('');
		AddBar(h,'Task','1/1/2001','1/13/2001','A',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Attention',OleVariant(G2antt1.Items.ItemByIndex[1]),'A',' <font ;11>! ') do
		begin
			RelativePosition := OleVariant(0.5);
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVOffset[EXG2ANTTLib_TLB.exNoteEnd] := 0;
			PartShadow[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartBackColor[EXG2ANTTLib_TLB.exNoteEnd] := $ffff;
		end;
	end;
	EndUpdate();
end
1834
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 1 )

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '12/26/2000';
		PaneWidth[False] := 128;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('');
		h := AddItem('Item');
		AddItem('');
		AddBar(h,'Task','1/1/2001','1/13/2001','A',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarBackgroundExt] := '[text=`<bgcolor=FFFF00><font ;11> ! `,align=0x11]';
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarBackgroundExtInflate] := OleVariant(8);
	end;
	EndUpdate();
end
1833
How do I get the "Summary" bar being shown in the control's histogram (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramAllItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib_TLB.exHistCumulative;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib_TLB.exKeepOriginalColor;
		end;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Task','1/2/2001','1/2/2001','',Null);
		ItemBar[hSummary,'',EXG2ANTTLib_TLB.exBarColor] := OleVariant(16777216);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','1/12/2001','1/17/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1832
How do I get the "Summary" bar being shown in the control's histogram (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramAllItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
		end;
		with Bars.Item['Summary'] do
		begin
			Color := $1000000;
			HistogramColor := $10000;
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
		end;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','1/12/2001','1/17/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1831
How can I temporarily/programmatically hide the control's tooltip

// RClick event - Fired when right mouse button is clicked
procedure TForm1.G2antt1RClick(ASender: TObject; );
begin
	with G2antt1 do
	begin
		nToolTipDelay := ToolTipDelay;
		ToolTipDelay := 0;
		ToolTipDelay := nToolTipDelay;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Column w/h tooltip...')) as EXG2ANTTLib_TLB.Column).ToolTip := 'This is a bit of text that''s shown when the cursor hovers the column.<br><br><sha ;;0><c>Right-Click to hide it</sha>';
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 128;
		UnitScale := EXG2ANTTLib_TLB.exDay;
	end;
	HeaderAppearance := EXG2ANTTLib_TLB.Flat;
	BackColorLevelHeader := BackColor;
	EndUpdate();
end
1830
Is it possible to find out the handle of the item, giving the key of the bar only

with G2antt1 do
begin
	BeginUpdate();
	Debug := True;
	DefaultItemHeight := 32;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
		FirstVisibleDate := '1/1/2001';
		ShowLinks := EXG2ANTTLib_TLB.exShowExtendedLinks;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/5/2001','1/7/2001','K2',Null);
		ItemBold[ItemBar[0,'K2',EXG2ANTTLib_TLB.exBarParent]] := True;
	end;
	EndUpdate();
end
1829
How can I programmatically add a link between two bars, knowing the keys of these bars only

with G2antt1 do
begin
	BeginUpdate();
	Debug := True;
	DefaultItemHeight := 32;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
		FirstVisibleDate := '1/1/2001';
		ShowLinks := EXG2ANTTLib_TLB.exShowExtendedLinks;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','AK2',Null);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/5/2001','1/7/2001','AK3',Null);
		AddLink('Link1',0,'K1',0,'AK2');
		AddLink('Link2',0,'K1',0,'<A?3>');
		AddLink('Link3',0,'<*2>',0,'AK3');
	end;
	EndUpdate();
end
1828
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	AutoDrag := EXG2ANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib_TLB.exSolidLine;
	Indent := 16;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
			FormatColumn := '((1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
1827
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	GridLineColor := RGB(190,190,190);
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	AutoDrag := EXG2ANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
			Def[EXG2ANTTLib_TLB.exCellPaddingRight] := OleVariant(4);
			AllowSizing := False;
			Width := 36;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:' + 
	'1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
1826
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	AutoDrag := EXG2ANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
			Def[EXG2ANTTLib_TLB.exCellPaddingRight] := OleVariant(4);
			Alignment := EXG2ANTTLib_TLB.RightAlignment;
			AllowSizing := False;
			Width := 24;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
1825
How can I programmatically group by columns, without having the control's sort bar visible

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	SortBarHeight := 0;
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Layout := 'multiplesort="C1:2"';
	EndUpdate();
end
1824
How do I perform my own sort

// Sort event - Fired when the control sorts a column.
procedure TForm1.G2antt1Sort(ASender: TObject; );
begin
	with G2antt1 do
	begin
		OutputDebugString( 'Sort' );
		with Items do
		begin
			ItemPosition[ItemByIndex[1]] := 0;
			ItemPosition[ItemByIndex[0]] := 1;
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	SingleSort := False;
	SortOnClick := EXG2ANTTLib_TLB.exUserSort;
	with Columns do
	begin
		(IUnknown(Add('Index')) as EXG2ANTTLib_TLB.Column).FormatColumn := '0 index ``';
		Add('Data 1');
		Add('Data 2');
	end;
	with Items do
	begin
		h := AddItem(OleVariant(0));
		CellValue[OleVariant(h),OleVariant(1)] := OleVariant(2);
		CellValue[OleVariant(h),OleVariant(2)] := OleVariant(3);
		h := AddItem(OleVariant(4));
		CellValue[OleVariant(h),OleVariant(1)] := OleVariant(5);
		CellValue[OleVariant(h),OleVariant(2)] := OleVariant(6);
		h := AddItem(OleVariant(7));
		CellValue[OleVariant(h),OleVariant(1)] := OleVariant(8);
		CellValue[OleVariant(h),OleVariant(2)] := OleVariant(9);
	end;
	Layout := 'multiplesort="C1:1 C2:2"';
	EndUpdate();
end
1823
Is it possible to have a different alignment for parts of the cell's caption

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := True;
	TreeColumnIndex := -1;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	with (IUnknown(Columns.Add('Default')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	end;
	with Items do
	begin
		CellHAlignment[OleVariant(AddItem('all-left')),OleVariant(0)] := EXG2ANTTLib_TLB.LeftAlignment;
		CellHAlignment[OleVariant(AddItem('all-center')),OleVariant(0)] := EXG2ANTTLib_TLB.CenterAlignment;
		CellHAlignment[OleVariant(AddItem('all-right')),OleVariant(0)] := EXG2ANTTLib_TLB.RightAlignment;
		h := AddItem('left<c>center<r>right');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
	end;
	EndUpdate();
end
1822
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		with (IUnknown(Add('MultipleLine')) as EXG2ANTTLib_TLB.Column) do
		begin
			Width := 32;
			Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
			Def[EXG2ANTTLib_TLB.exColumnResizeContiguously] := OleVariant(True);
		end;
		with (IUnknown(Add('SingleLine')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		end;
	end;
	with Items do
	begin
		CellValue[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'This is a bit of long text that should break the line';
	end;
	EndUpdate();
end
1821
Is there an other way to detect if a bar is overlapping any other bar

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TForm1.G2antt1BarResizing(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
	with G2antt1 do
	begin
		Refresh();
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	HeaderAppearance := EXG2ANTTLib_TLB.Etched;
	BackColorLevelHeader := BackColor;
	DefaultItemHeight := 22;
	Columns.Add('Task');
	with (IUnknown(Columns.Add('Intersect / Count')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'A';
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(521);
		LevelKey := OleVariant(1);
	end;
	with (IUnknown(Columns.Add(' / With')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'A';
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(520);
		LevelKey := OleVariant(1);
	end;
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 148;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsOffset;
			OverlaidGroup := 'TaskB';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
		with Bars.Add('TaskB') do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
	end;
	with Items do
	begin
		h := AddItem('A');
		AddBar(h,'Task','1/2/2001','1/4/2001','A','A');
		AddBar(h,'TaskB','1/3/2001','1/5/2001','B','B');
		h := AddItem('A');
		AddBar(h,'Task','1/6/2001','1/9/2001','A','A');
		AddBar(h,'TaskB','1/10/2001','1/13/2001','B','B');
		h := AddItem('A');
		AddBar(h,'TaskB','1/6/2001','1/9/2001','B1','B1');
		AddBar(h,'Task','1/10/2001','1/13/2001','A','A');
		AddBar(h,'TaskB','1/10/2001','1/13/2001','B2','B2');
		h := AddItem('A');
		AddBar(h,'Task','1/8/2001','1/11/2001','B1','B1');
		AddBar(h,'Task','1/10/2001','1/13/2001','A','A');
		AddBar(h,'Task','1/12/2001','1/15/2001','B2','B2');
	end;
	EndUpdate();
end
1820
How can I get the absolute position of an item
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task','1/2/2017','1/5/2017',Null,Null);
		end;
	end
end;

// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( CellCaption[OleVariant(G2antt1.ItemFromPoint[-1,-1,c,hit]),'Position'] );
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2017';
	end;
	BackColorLevelHeader := BackColor;
	BackColorAlternate := RGB(240,240,240);
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).DisplayFilterButton := True;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(InsertItem(h,Null,'Child 1'),Null,'Sub-Child 1');
		InsertItem(InsertItem(h,Null,'Child 2'),Null,'Sub-Child 2');
	end;
	PutItems(GetItems(OleVariant(-1)),Null);
	PutItems(GetItems(OleVariant(-1)),Null);
	PutItems(GetItems(OleVariant(-1)),Null);
	with (IUnknown(Columns.Add('Position')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 apos ``';
		Visible := False;
	end;
	EndUpdate();
end
1819
How do I sort the index column as numeric (Method 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			CellData[OleVariant(Item),OleVariant(1)] := OleVariant(CellCaption[OleVariant(Item),OleVariant(1)]);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('Next')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(4);
		Def[EXG2ANTTLib_TLB.exHeaderPaddingLeft] := OleVariant(4);
	end;
	with (IUnknown(Columns.Add('Index')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		SortType := EXG2ANTTLib_TLB.SortUserData;
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
		AddItem('Item 6');
		AddItem('Item 7');
		AddItem('Item 8');
		AddItem('Item 9');
		AddItem('Item 10');
	end;
	EndUpdate();
end
1818
How do I sort the index column as numeric (Method 1)

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Sort Index As String (Default)')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 index ``';
	end;
	with (IUnknown(Columns.Add('Sort Index As Numeric')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%C0';
		SortType := EXG2ANTTLib_TLB.SortNumeric;
	end;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1817
How can I put icons/images into buttons

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (IUnknown(Columns.Add('C+B')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXG2ANTTLib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXG2ANTTLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	DefaultItemHeight := 20;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1816
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// ButtonClick event - Occurs when user clicks on the cell's button.
procedure TForm1.G2antt1ButtonClick(ASender: TObject; Item : HITEM;ColIndex : Integer;Key : OleVariant);
begin
	with G2antt1 do
	begin
		OutputDebugString( 'ButtonClick' );
		OutputDebugString( Item );
		OutputDebugString( Key );
	end
end;

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
			OutputDebugString( 'CellStateChanged' );
		OutputDebugString( Item );
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	with (IUnknown(Columns.Add('')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		FormatColumn := '1 index ``';
	end;
	with (IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '`     `';
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXG2ANTTLib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXG2ANTTLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1815
Does filtering work with umlauts / accents characters

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Names')) as EXG2ANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXG2ANTTLib_TLB.exPattern;
	end;
	with Items do
	begin
		AddItem('Mantel');
		AddItem('Mechanik');
		AddItem('Motor');
		AddItem('Murks');
		AddItem('Märchen');
		AddItem('Möhren');
		AddItem('Mühle');
		AddItem('Sérigraphie');
	end;
	Columns.Item[OleVariant(0)].Filter := '*ä*';
	ApplyFilter();
	EndUpdate();
end
1814
How can I temporarily disable resizing the overview part of the control

with G2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	OnResizeControl := EXG2ANTTLib_TLB.exDisableOverview;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib_TLB.exOverviewSplitter) Or Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib_TLB.exOverviewAllowVerticalScroll) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible);
		OverviewHeight := 32;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1813
Is it possible to resize the overview part of the control at runtime

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZCh' + 
	'GJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJ' + 
	'wgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwg' + 
	'GOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEIF' + 
	'oEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTE' + 
	'ycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5' + 
	'pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGc' + 
	'Q40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWAx' + 
	'nEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQ' + 
	'wuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfAS' + 
	'McaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixx' + 
	'B4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPwf' + 
	'xEh1guAIAwQAgCAg');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib_TLB.exOverviewSplitter) Or Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib_TLB.exOverviewAllowVerticalScroll) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible);
		OverviewHeight := 32;
		OverviewSelBackColor := $1000000;
		OverviewBackColor := $fafafa;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1812
You've provided examples of how to create bars for each record of a MS Access table, however I would like to create a database connected Gantt that has multiple bars per item/resource. Could you please advise

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TForm1.G2antt1AddGroupItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Summary',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],'0',Null);
			DefineSummaryBars(Item,'0',-3,'0');
			AddBar(Item,'SummaryB',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],'1',Null);
			DefineSummaryBars(Item,'1',-3,'1');
			ItemBackColor[Item] := $f0f0f0;
		end;
		Chart.ItemBackColor[Item] := $f0f0f0;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellValue[OleVariant(Item),OleVariant(2)],CellValue[OleVariant(Item),OleVariant(4)],ItemBar[Item,'',EXG2ANTTLib_TLB.exBarsCount],Null);
			AddBar(Item,'TaskB',CellValue[OleVariant(Item),OleVariant(3)],CellValue[OleVariant(Item),OleVariant(4)],ItemBar[Item,'',EXG2ANTTLib_TLB.exBarsCount],Null);
		end;
	end
end;

// MouseDown event - Occurs when the user presses a mouse button.
procedure TForm1.G2antt1MouseDown(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		i := ItemFromPoint[-1,-1,c,hit];
		FullRowSelect := Columns.Item[OleVariant(c)].Data;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	HeaderHeight := 22;
	HeaderAppearance := EXG2ANTTLib_TLB.Flat;
	BackColorLock := RGB(240,240,240);
	BackColorHeader := BackColorLock;
	HasLines := EXG2ANTTLib_TLB.exNoLine;
	ColumnAutoResize := False;
	SortBarVisible := False;
	AllowGroupBy := True;
	ReadOnly := EXG2ANTTLib_TLB.exReadOnly;
	ShowFocusRect := False;
	CountLockedColumns := 1;
	AutoDrag := EXG2ANTTLib_TLB.exAutoDragScroll;
	SingleSort := False;
	ColumnsAllowSizing := True;
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	GridLineStyle := EXG2ANTTLib_TLB.exGridLinesSolid;
	GridLineColor := RGB(220,220,220);
	with Chart do
	begin
		FirstVisibleDate := '9/1/1994';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Item['Task'] do
		begin
			Height := 15;
			Color := $808080;
			StartColor := $cccc;
			EndColor := StartColor;
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,TaskB';
			Pattern := Integer(EXG2ANTTLib_TLB.exPatternGradientVBox) Or Integer(EXG2ANTTLib_TLB.exPatternBox);
		end;
		with Bars.Copy('Task','TaskB') do
		begin
			Color := $808080;
			StartColor := $9999;
			EndColor := StartColor;
		end;
		with Bars.Item['Summary'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Summary,SummaryB';
			Color := $cccc;
			StartColor := Color;
			EndColor := Color;
		end;
		with Bars.Copy('Summary','SummaryB') do
		begin
			Color := $9999;
			StartColor := Color;
			EndColor := Color;
		end;
	end;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Debug := True;
	Columns.Item[OleVariant(0)].Data := OleVariant(-1);
	Layout := 'singlesort="C5:1";multiplesort=" C1:2"';
	EndUpdate();
end
1811
How can I filter for multiple captions on a single column, using OR clause

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXG2ANTTLib_TLB.Column).Width := 96;
		with (IUnknown(Add('Title')) as EXG2ANTTLib_TLB.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Inside';
	FilterBarPromptType := EXG2ANTTLib_TLB.exFilterPromptContainsAny;
	EndUpdate();
end
1810
How can I filter for multiple captions on a single column, using AND clause

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXG2ANTTLib_TLB.Column).Width := 96;
		with (IUnknown(Add('Title')) as EXG2ANTTLib_TLB.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Sales';
	FilterBarPromptType := EXG2ANTTLib_TLB.exFilterPromptContainsAll;
	EndUpdate();
end
1809
How can I display the limits/margins of the project, in the overview part of the control

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZCh' + 
	'GJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJ' + 
	'wgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwg' + 
	'GOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEIF' + 
	'oEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTE' + 
	'ycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5' + 
	'pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGc' + 
	'Q40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWAx' + 
	'nEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQ' + 
	'wuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfAS' + 
	'McaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixx' + 
	'B4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPwf' + 
	'xEh1guAIAwQAgCAg');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := EXG2ANTTLib_TLB.OverviewVisibleEnum($400 Or Integer(EXG2ANTTLib_TLB.exOverviewShowSelMargins) Or Integer(EXG2ANTTLib_TLB.exOverviewShowMargins) Or Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScaleBottom) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible));
		OverviewHeight := 64;
		OverviewSelBackColor := $1000000;
		OverviewBackColor := $fafafa;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1808
Is it possible to display a time-scale for the overview part of the control (separated)

with G2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScaleSplit) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible);
		OverviewHeight := 48;
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1807
Is it possible to display a time-scale for the overview part of the control

with G2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible);
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1806
How can I display the time-scale only, in the overview part of the control

with G2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib_TLB.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib_TLB.exOverviewHideBars) Or Integer(EXG2ANTTLib_TLB.exOverviewShowAllVisible);
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Null,Null);
	end;
	EndUpdate();
end
1805
How can I detect that the mouse pointer is within an InsideZoom object
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	with G2antt1 do
	begin
		with Chart do
		begin
			d := DateFromPoint[-1,-1];
			iz := (IUnknown(InsideZooms.Contains[OleVariant(d)]) as _TLB.Object);
			OutputDebugString( d );
			OutputDebugString( 'If the iz object is nothing, the date is not zoomed, else it is.' );
			OutputDebugString( iz );
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
		AllowInsideZoom := True;
		InsideZooms.Add('1/10/2001');
	end;
	EndUpdate();
end
1804
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	ItemsAllowSizing := EXG2ANTTLib_TLB.exResizeItem;
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	HeaderHeight := 28;
	DefaultItemHeight := 24;
	BackColorLevelHeader := BackColor;
	HeaderAppearance := EXG2ANTTLib_TLB.Bump;
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		with Bars.Copy('Task','TaskB') do
		begin
			Height := 15;
			Pattern := EXG2ANTTLib_TLB.exPatternBox;
			StartColor := $ffe8cc;
			EndColor := StartColor;
			Color := $ff0000;
		end;
		with Bars.Item['Task'] do
		begin
			Height := -1;
			Pattern := EXG2ANTTLib_TLB.exPatternBox;
			StartColor := $ffe8cc;
			EndColor := StartColor;
			Color := $ff0000;
		end;
	end;
	with Items do
	begin
		h := AddItem('Word-Wrap Inside');
		AddBar(h,'Task','1/9/2001','1/13/2001','A1',Null);
		ItemBar[h,'A1',EXG2ANTTLib_TLB.exBarBackgroundExt] := 'none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]';
		h := AddItem('Word-Wrap Inside');
		AddBar(h,'Task','1/5/2001','1/19/2001','A2',Null);
		ItemBar[h,'A2',EXG2ANTTLib_TLB.exBarBackgroundExt] := 'none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]';
		h := AddItem('Word-Wrap Back');
		AddBar(h,'TaskB','1/9/2001','1/13/2001','A3',Null);
		ItemBar[h,'A3',EXG2ANTTLib_TLB.exBarBackgroundExt] := 'client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]';
		ItemBar[h,'A3',EXG2ANTTLib_TLB.exBarBackgroundExtFlags] := OleVariant(2);
	end;
	EndUpdate();
end
1803
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	FilterBarHeight := 0;
	FilterBarPromptVisible := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXG2ANTTLib_TLB.Column).Width := 96;
		(IUnknown(Add('Title')) as EXG2ANTTLib_TLB.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellValue[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellValue[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptPattern := 'London';
	EndUpdate();
end
1802
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			SetParent(Item,FindItem[CellValue[OleVariant(Item),'ReportsTo'],'EmployeeID',Null]);
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('SELECT * FROM Employees ORDER BY ReportsTo','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.ExpandItem[0] := True;
	EndUpdate();
end
1801
How can I highlight the limits/margins of a summary bar, according with the child bars

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoAQ' + 
	'0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA=');
		Add(2,'CP:1 -4 0 5 0');
		Add(3,'gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TNC' + 
	'MTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIlQ' + 
	'jJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZO' + 
	'HYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQJ' + 
	'ZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA==');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Summary'].Color := $3000000;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Null);
		hTask := InsertItem(hSummary,Null,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Null);
		hTask := InsertItem(hSummary,Null,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Null);
		hTask := InsertItem(hSummary,Null,'Task C');
		AddBar(hTask,'Task','1/6/2001','1/10/2001','K3',Null);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
		ItemBar[hSummary,'',EXG2ANTTLib_TLB.exSummaryBarBackColor] := OleVariant(33554432);
	end;
	EndUpdate();
end